package StudyCode.summary.myfile;

import java.io.File;
import java.net.URI;
import java.net.URISyntaxException;
import java.nio.file.Path;
import java.nio.file.Paths;

/**
 * 版权所有 科技与人文(www.tah1986.com)
 */
public class IOFileNIOFile {
	public static void main(String[] args) {
		try {
			Path path = Paths.get(new URI("file:///E:/Copy/test.txt"));
			File file = new File("E:/Copy/test.txt");
			Path toPath = file.toPath();
			System.out.println("Path 对象是否等于同路径的 File.toPath?" + toPath.equals(path));
		} catch (URISyntaxException e) {
			e.printStackTrace();
		}
	}
}
